//
//  XTMatchCollectionViewCell.m
//  BeautifulHome
//
//  Created by dlios on 15-5-13.
//  Copyright (c) 2015年 ACE. All rights reserved.
//

#import "XTMatchCollectionViewCell.h"

@interface XTMatchCollectionViewCell ()



@end
@implementation XTMatchCollectionViewCell

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.myImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:_myImageView];
        [_myImageView release];
        self.myLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_myLabel];
        [_myLabel release];
    }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    _myImageView.frame = CGRectMake(0, 0, self.contentView.bounds.size.width, self.contentView.bounds.size.height - 80);
    _myImageView.layer.masksToBounds = YES;
    _myImageView.layer.cornerRadius = 5;
    _myLabel.frame = CGRectMake(0, _myImageView.frame.size.height, _myImageView.frame.size.width, 80);
    _myLabel.font = [UIFont systemFontOfSize:15];
    _myLabel.numberOfLines = 0;
    [_myLabel setLineBreakMode:NSLineBreakByClipping];
}

@end
